package view.report;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import main.WinkelApplication;
import view.Manage;
import view.ProductDetails;

/**
 *
 * @author Kevin
 */
public class ReportPanel extends JPanel
{
    public ReportPanel()
    {
        super();
        
        setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        
        initComponents();
    }

    private void initComponents()
    {
        JTabbedPane tabs = new JTabbedPane();
        tabs.addTab("Omzet", new RevenuePanel());
        tabs.addTab("Verkochte producten", new ProductsSoldPanel());

        JButton backBtn = new JButton("Terug");
        backBtn.addActionListener(new ActionListener() 
        {
            public void actionPerformed(ActionEvent e)
            {
                WinkelApplication instance = WinkelApplication.getInstance();
                instance.showPanel(new Manage(instance.getAccesLevel()));
            }
        });
        
        add(tabs);
        add(backBtn);
    }
}
